feat: add missing PhoneNumberToCarrierMapper feature that is available in java version#317
Open
wmundev wants to merge 6 commits intotwcclegg:mainfrom
Open
feat: add missing PhoneNumberToCarrierMapper feature that is available in java version#317wmundev wants to merge 6 commits intotwcclegg:mainfrom
wmundev wants to merge 6 commits intotwcclegg:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a C# implementation of carrier-name lookup to bring the library closer to libphonenumber’s Java feature set, reusing the existing prefix-mapping/resource-loading model already used for offline geocoding.
Changes:
- Add
PhoneNumberToCarrierMapperand sharedPrefixFileReadersupport for carrier prefix data from embedded folders or zip resources. - Expose
PhoneNumberUtil.IsMobileNumberPortableRegionand add unit tests covering production, synthetic, and zipped carrier datasets. - Wire carrier resources into project files, CI/build scripts, ignore rules, and README usage/testing documentation.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
csharp/PhoneNumbers/PrefixFileReader.cs |
New shared loader for prefix-based mapping data used by carrier lookups. |
csharp/PhoneNumbers/PhoneNumbers.csproj |
Embeds carrier resources similarly to geocoding resources. |
csharp/PhoneNumbers/PhoneNumberUtil.cs |
Adds region-level mobile-number-portability lookup API. |
csharp/PhoneNumbers/PhoneNumberToCarrierMapper.cs |
Introduces the public carrier-mapper API and singleton access. |
csharp/PhoneNumbers.Test/TestPhoneNumberToCarrierMapper.cs |
Adds production/test/zipped-path coverage for carrier lookup behavior. |
csharp/PhoneNumbers.Test/PhoneNumbers.Test.csproj |
Embeds test carrier resources and zipped test archive. |
appveyor.yml |
Updates Windows CI packaging steps for carrier resources. |
README.md |
Documents carrier lookup usage and local test zip generation. |
.gitignore |
Ignores generated carrier zip artifacts. |
.github/workflows/run_all_tests_and_upload_code_coverage.yml |
Generates zipped test carrier data for Windows GitHub Actions. |
.github/workflows/build_and_run_unit_tests_linux.yml |
Generates zipped test carrier data for Linux GitHub Actions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 12 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes